//
//  CityTableViewCell.m
//  OneDay
//
//  Created by lanou3g on 15/10/27.
//  Copyright © 2015年 oneDay. All rights reserved.
//

#import "CityTableViewCell.h"

@implementation CityTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addCityButtons];
    }
    return self;
}

- (void)addCityButtons
{
    CGFloat kSpace = 0.02 * kWidth;
    NSInteger num = 1000;
    for (int i = 0; i < 5; i++) {
        for (int j = 0; j < 3; j++) {
            UIButton *button = [UIButton buttonWithType:(UIButtonTypeCustom)];
            button.frame = CGRectMake(kSpace + j * (0.3 * kWidth), 5 + i * 60, 0.25 * kWidth, 40);
            button.layer.borderWidth = 0.4;
            button.layer.cornerRadius = button.frame.size.width / 15;
            [button setTitleColor:[UIColor blackColor] forState:(UIControlStateNormal)];
            button.tag = num;
            [self addSubview:button];
            num++;
        }
    }
}









- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
